package com.bupt.vueblog.dao;

import com.bupt.vueblog.domain.dto.UserChangeDTO;
import com.bupt.vueblog.domain.entity.User;
import com.bupt.vueblog.domain.dto.UserDTO;
import org.apache.ibatis.annotations.Mapper;

/**
 * @author 谭继好
 * @Description
 * @date 2024-04-09 09:18
 */
@Mapper
public interface UserDAO {

    User getByName(String name);

    // 通过id查询用户，修改用户信息时调用此方法判断原始密码是否正确
    User getById(Integer id);

    void insert(UserDTO user);

    void update(UserChangeDTO user);

    void delete(Integer id);
}
